package com.manish.tabdemo;


import com.manish.tabdemo.R;
import com.manish.tabdemo.R.id;
import com.manish.tabdemo.R.layout;
import com.manish.tabdemo.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class StartActivity extends Activity {
	
	Button imageContinua;
	Button imageLogin;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_start);
		
		addListenerOnButtonContinua();
		addListenerOnButtonLogin();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.start, menu);
		return true;
	}
	
	public void addListenerOnButtonContinua() {

		imageContinua = (Button) findViewById(R.id.continua);

		imageContinua.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent(getApplicationContext(), TabHostActivity.class);
				startActivity(intent);
			}

		});

	}

	public void addListenerOnButtonLogin() {

		imageLogin = (Button) findViewById(R.id.effettua);

		imageLogin.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent(getApplicationContext(), EffettuaLoginActivity.class);
				startActivity(intent);
			}

		});

	}


}
